package com.leenmvc.core.security.entity.core;

import com.leenmvc.core.annotation.DbInfo;
import com.leenmvc.core.annotation.PrimaryKey;
import com.leenmvc.core.annotation.TableField;
import com.leenmvc.core.base.BaseEntity;
import com.leenmvc.core.base.result.Result;

import java.util.List;

/**
 *
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2020-03-05
 */

@DbInfo(value = "sys_api", comment = "API记录")
public class SysApi extends BaseEntity {

    @PrimaryKey
    private Long id;

    /**
     * 请求uri
     */
	private String uri;
    /**
     * 模块
     */
	private String module;
    /**
     * 操作
     */
	private String operation;
    /**
     * 请求方法
     */
	private String requestMethod;
    /**
     * 类名
     */
	private String className;
    /**
     * 方法名字
     */
	private String methodName;
    /**
     * 是否保护
     */
	private Integer protecting;

    /**
     * api授权
     */
	private String requiresPermissions;

	@TableField(false)
	private String requestParams;

	@TableField(false)
	private Object requestBody;

	@TableField(false)
	private Result requestResult;

	@TableField(false)
	private List<SysApiParam> apiParams;

    @TableField(false)
    private List<SysApiResult> apiResults;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public void setProtecting(Integer protecting) {
        this.protecting = protecting;
    }

    public Integer getProtecting() {
        return protecting;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public List<SysApiParam> getApiParams() {
        return apiParams;
    }

    public void setApiParams(List<SysApiParam> apiParams) {
        this.apiParams = apiParams;
    }

    public List<SysApiResult> getApiResults() {
        return apiResults;
    }

    public void setApiResults(List<SysApiResult> apiResults) {
        this.apiResults = apiResults;
    }

    public String getRequestParams() {
        return requestParams;
    }

    public void setRequestParams(String requestParams) {
        this.requestParams = requestParams;
    }

    public Object getRequestBody() {
        return requestBody;
    }

    public void setRequestBody(Object requestBody) {
        this.requestBody = requestBody;
    }

    public Result getRequestResult() {
        return requestResult;
    }

    public void setRequestResult(Result requestResult) {
        this.requestResult = requestResult;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getRequiresPermissions() {
        return requiresPermissions;
    }

    public void setRequiresPermissions(String requiresPermissions) {
        this.requiresPermissions = requiresPermissions;
    }
}
